A database is an electronic filing system that stores data in a structured way. The primary storage structure in a database is a table, although unstructured mechanisms may be used as well. A database may contain multiple tables and each table may hold information of a specific type. Database tables store and organize data in horizontal rows and vertical columns. For example, in a row store database, rows typically correspond to real-world entities or relationships that represent individual records in a table. Columns may denote specific attributes of those entities or relationships, such as “name,” “address” or “phone number.” In this example, Company X may have a database containing a “customer” table listing the names, addresses, and phone numbers of its customers. Each row may represent a single customer, and the columns may represent each customer's name, address, and phone number.
A database may receive at least one command implementing operations, such as a query, a join, and the like, on the data in the database. Moreover, the database management system of the database may have a plurality of ways of retrieving the result set for the received command(s). The database management system may thus determine a query plan to determine how to perform the operations required to obtain the result set from the database. Thus, the query plan, which is also referred to as a calculation plan, defines how the operations are performed at the database to obtain the result set.